﻿using System;
using System.ComponentModel.DataAnnotations;
using LERP.Domain;

namespace LERP.Web.Controllers.ViewModels.ContractViewModels
{
    public class ContractViewModel
    {
        /// <summary>
        /// 合同编码
        /// </summary>  
        [Display(Name = "合同编码")] 
        public virtual int Id { get; set; }
        /// <summary>
        /// 签约客户
        /// </summary>  
        [Display(Name = "签约客户")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual int Customer { get; set; }


        /// <summary>
        /// 合同编号
        /// </summary>  
        [Display(Name = "合同编号")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual string Code { get; set; }
        /// <summary>
        /// 签约客户
        /// </summary>  
        [Display(Name = "签约客户")] 
        public virtual string CustomerName { get; set; }
        /// <summary>
        /// 合同开始时间
        /// </summary>  
        [Display(Name = "开始时间")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual string BeginTime { get; set; }
        /// <summary>
        /// 合同结束时间
        /// </summary>  
        [Display(Name = "结束时间")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual string EndTime { get; set; }
    }
}